home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc20 / gemfsc20.lzh / EXAMPLES / BROWSE / BRMALLOC.C < prev    next >
C/C++ Source or Header  |  1992-12-07  |  715b  |  29 lines

  1. /*****************************************************************************
  2.  * BRMALLOC - Default memory alloc/free routines.
  3.  *
  4.  *    If for some reason you don't want to use your compiler's malloc/free,
  5.  *    you can supply your own br_malloc and br_free and all browser memory
  6.  *    management will use the routines you supply.
  7.  ****************************************************************************/
  8. #include <stdlib.h>
  9. #include "browser.h"
  10.  
  11. #if __SOZOBONC__ < 0x0140
  12.   typedef short size_t;
  13.   extern  void    *malloc();
  14.   extern  void    free();
  15. #endif
  16.  
  17. void *br_malloc(amount)
  18.     size_t amount;
  19. {
  20.     return malloc(amount);
  21. }
  22.  
  23. void br_free(block)
  24.     void *block;
  25. {
  26.     if (block)
  27.         free(block);
  28. }
  29.